import Vue from 'vue'
import Vuex from 'vuex'

// 挂载Vuex
Vue.use(Vuex)
import demoStore from '@/view/demo/demo_store.js'
import dialogchangjStore from '@/components/dialogchangj/dialogchangj_store.js'
// 创建VueX对象
const store = new Vuex.Store({
  state: {
        // 存放的键值对就是所要管理的状态
    name: 'helloVueX',
    age: '15'
  },
  modules: {
    demo: demoStore,
    dialogchangj: dialogchangjStore
  },
  mutations: {
      // es6语法，等同edit:funcion(){...}

  }
})

export default store
